/**
 * 
 */
package soa.security.ws;

import soa.security.exception.OrganizationException;

import javax.jws.WebParam;
import javax.jws.WebService;

/**
 * @author CreGu
 *
 */
@WebService
public interface PositionService {
	/**
	 * 岗位信息新增
	 * 
	 * @param organizationId
	 * @param position
	 * @return
	 * @throws OrganizationException
	 */
	public boolean addPosition(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "position") String position)
			throws OrganizationException;

	/**
	 * 岗位信息修改
	 * 
	 * @param organizationId
	 * @param position
	 * @return
	 * @throws OrganizationException
	 */
	public boolean updatePosition(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "position") String position)
			throws OrganizationException;

	/**
	 * 获取机构内的所有岗位信息
	 * 
	 * @param organizationId
	 * @return
	 * @throws OrganizationException
	 */
	public String allPositions(
			@WebParam(name = "organizationId") String organizationId)
			throws OrganizationException;

	/**
	 * 获取指定岗位信息
	 * 
	 * @param organizationId
	 * @param positionId
	 * @return
	 * @throws OrganizationException
	 */
	public String getPosition(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "positionId") String positionId)
			throws OrganizationException;

	/**
	 * 以下为关系服务
	 */

	/**
	 * 增加岗位与人员关系
	 * 
	 * @param organizationId
	 * @param positionId
	 * @param personIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean addPersons(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "positionId") String positionId,
			@WebParam(name = "personIds") String personIds)
			throws OrganizationException;

	/**
	 * 删除岗位与人员关系
	 * 
	 * @param organizationId
	 * @param positionId
	 * @param personIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean removePersons(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "positionId") String positionId,
			@WebParam(name = "personIds") String personIds)
			throws OrganizationException;

	/**
	 * 获取岗位下所有人员信息
	 * 
	 * @param organizationId
	 * @param positionId
	 * @return
	 * @throws OrganizationException
	 *             String
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public String allPersons(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "positionId") String positionId)
			throws OrganizationException;
}
